home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Dev / misc / LOCCounter.lha / LOCCounter / src / ArgParser.h < prev    next >
C/C++ Source or Header  |  2004-08-17  |  888b  |  41 lines

  1. #ifndef LOC_ARG_PARSER_H
  2. #define LOC_ARG_PARSER_H
  3. /****************************************************************************
  4. *
  5. * $RCSfile: ArgParser.h $
  6. * $Revision: 2.4 $
  7. * $Date: 2004/08/17 21:53:22 $
  8. * $Author: ssolie $
  9. *
  10. *****************************************************************************
  11. *
  12. * Copyright (c) 2004 Steven Solie.  All Rights Reserved.
  13. *
  14. *****************************************************************************
  15. *
  16. * ArgParser component
  17. *
  18. * Each ArgParser object is capable of parsing AmigaDOS templates.
  19. */
  20.  
  21. #include <dos/rdargs.h>
  22.  
  23.  
  24. class ArgParser {
  25. public:
  26.     ArgParser();
  27.     ~ArgParser();
  28.     bool parse(const char* dos_template);
  29.     bool getBoolean(const char* arg, bool def);
  30.     char* firstString(const char* arg);
  31.     char* nextString();
  32. private:
  33.     RDArgs* m_args;
  34.     const char* m_dos_template;
  35.     int32 m_results[MAX_TEMPLATE_ITEMS];
  36.     char** m_strings;
  37. };
  38.  
  39.  
  40. #endif
  41.